home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ian & Stuart's Australian Mac 1
/
Ian and Stuart's One (Australia).iso
/
Australasian Legends
/
Commercial
/
Rainbow Hill
/
MacDOS™ 2.0.0
/
User's Guide
/
C
< prev
Wrap
Text File
|
1994-09-20
|
11KB
|
235 lines
C DOS Glossary
This section uses Macintosh concepts to explain terms that
MacDOS has inherited from DOS.
batch
Many Macintosh programs have their own scripting language.
A batch program is nothing else than a script for MacDOS:
you prepare a file containing a series of commands and then
tell MacDOS to execute it.
As MacDOS supports a character oriented interface, batch
and interactive commands are identical. This is not the
case in most (if not all) other Macintosh programs, because
they are normally controlled via dialogs and menus, while
their scripting languages, by their own nature, consist of
written directives.
Another way of understanding batch programs is to compare
them with macros. When you prepare a macro, you switch the
macro recording ON, perform some operations, and stop the
recorder. By executing the macro, you can then repeat the
same operations over and over again. The batch mechanism
can work in exactly the same way: you start logging with
the command LOG, type some commands, and stop the logging.
By executing the log file as a batch program, you can then
repeat the same commands as many times as you like.
cntl-C
By pressing the 'C' key together with the control key, you
force MacDOS to prompt you for a new command. This is
useful when you want to interrupt a long DIRectory listing
or any other operation. cntl-C also interrupts batch
programs.
If your keyboard does not have the control key, you can
achieve the same result by pressing the command and period
keys together (cmd-dot).
In some cases, especially during recursive operations, you
might have to type cntl-C (or cmd-dot) more than once in
order to interrupt MacDOS.
command
A command is just a way of telling MacDOS all it needs to
know in order to perform a particular operation. The first
word in a command (ie. the command name) tells MacDOS what
to do, while the other words (ie. command parameters and
switches) specify on what it should operate and how.
A command with switches is a bit like a menu: when you
select a menu, you can choose between different options by
selecting a particular menu item. When you type a command
in MacDOS, you can choose between different options by
typing particular switches.
delete
The word "delete" always refers to files, never to folders.
When you use the command DEL to delete files, MacDOS
removes the corresponding entry from the disk directory.
The result is that the file immediately "disappears" from
the system and the space it occupied is made available for
other uses. This is VERY different from the standard
behaviour of the Finder, which only removes files from the
system when you empty the Trash.
directory
"directory" essentially is a synonym of "folder". In fact,
the term "folder" was only introduced together with the
desktop metaphor. By then, UNIX users were already familiar
with commands like CD and MKDIR.
Sometimes, the term "directory" is used to indicate a
"directory list" produced with the command DIR. This might
not be entirely correct, but it does not normally create
any confusion.
drive
Drives are physical devices which let you access storage
media. To distinguish between different drives, operating
systems number them. For example, the Mac OS assigns the
number 1 to the internal floppy drive and 2 to the external
one. DOS uses the letters A and B for the same purpose.
The "drive numbers" of the Macintosh and the "drive IDs" of
DOS are basically the same thing.
extension
The Mac OS associates a series of parameters and flags to
each file in the system. In that way, it can decide
whether, how, and where each file icon should appear on the
desktop. Just by looking at an icon, you can normally
distinguish between applications and documents.
Furthermore, you can also identify which application
created each document.
DOS does not have the capabilities of the Mac OS. In order
to distinguish between different file types, DOS splits
each filename into two parts separated by a dot, and uses
the second part to identify the type. That second part,
which cannot exceed three characters in length, is called
the "extension" (nothing to do with the MacDOS extensions,
which are filter applications). Generic text files should
have the extension TXT, batch programs BAT, applications
EXE (for EXEcutable), documents DOC, etc.
This strategy, at least as it has been implemented, can
cause quite a bit of confusion. This is due to the fact
that DOS does not (and cannot) enforce the naming
conventions. Therefore, you are totally free to use the
extensions as you like. For example, you can call a text
file readme.doc or an application process.txt . You can
also create non-standard names like use.me or
this_is.it . As if this were not enough, you cannot even
distinguish between files created with different
applications. For example, a file called book.doc could
have been produced with any word processor.
file
In "Inside Macintosh Vol 2", Apple states: "A file is a
named, ordered sequence of bytes". This is also applicable
to DOS files. Both with DOS and the Mac OS you normally
operate on files as single entities, although Macintosh
files consist of two separate forks. In some cases, MacDOS
lets you operate separately on Data and Resource forks.
global variables
Global variables have two main functions: to store
temporary information during the execution of batch
programs and to memorise your "preferences" if you set them
within autoexec.bat .
parameter
In most cases, parameters identify the items on which
commands and batch programs operate. Many commands expect
file or folder specifications as parameters. Therefore, the
passing of parameters to a MacDOS command often corresponds
to filling in text fields in a Macintosh dialog box (eg.
after selecting the "Open..." or "Save as..." menu items).
path
A path is nothing else than the list of folders you have to
enter in order to reach a particular item (file or folder).
The MacDOS convention is to use a backslash to separate
adjacent folder names.
A path which begins with a backslash is said to be
"absolute" and indicates that you have to start entering
folders from the outermost one. A path which begins with a
folder name (ie. not with a backslash) is said to be
"relative", and indicates that your starting point is the
current folder. The fictitious folder name ".." indicates
that you have to enter the folder which contains the one
you are currently in.
When you add a folder name to a path, it is as if you
memorised the double-clicking on the corresponding folder
icon.
pipe
A pipe is a way of using the output of a command as input
to another command.
In Macintosh terms, the closest thing to a pipe is to "Cut"
and "Paste" or "Drag" and "Drop" between different
applications.
prompt
MacDOS displays the command prompt to let you know that it
is ready to accept a new command. This is equivalent to the
Finder changing the cursor from a watch back to an arrow.
Other prompts (eg. when asking confirmation before deleting
a file) are equivalent to displaying dialog boxes like the
"...Are you sure you want to permanently remove it?" alert
that you get when you empty the Trash.
redirection
Many commands display information on the monitor screen.
Some, like DIR and TYPE, do nothing else. Others, like COPY
and RENAME, do it to inform you of their progress. In all
cases, you can save that information for later examination
and processing by redirecting the command output to a disk
file.
Similarly, input redirection lets you prepare input data
off-line and then use it when you need it, thereby freeing
you from the task of typing it interactively.
As both output to the monitor and input from the keyboard
consist of ASCII characters, files used for redirection are
always of type 'TEXT'.
In a sense, I/O redirection is similar to the "export" and
"import" functions of many Macintosh applications.
root
The "root" is the filing cabinet where you keep all your
folders. As there is exactly one root per volume (ie. hard
disk partition, floppy, etc.), for all practical purposes
you can identify the root with the volume itself.
When you format a floppy, the Operating System
automatically creates the "root". It is then up to you to
grow "trunk" folders and "branch" off into further
subfolders. The "leaves" of such a directory tree are
files, which you are not allowed to further subdivide
(although the Macintosh still gives you two "forks"). In
the Macintosh environment, the root is represented by the
window that you get when you double click on a volume icon.
switch
A DOS switch is a part of a command which lets you enable
or disable optional features of the command. In its
simplest form, a switch consists of a slash followed by a
letter of the alphabet, but switches which control powerful
options are more complex than that.
The Macintosh equivalent of a switch is an option that you
can select via a dialog box. For example, when you select
the "Print..." menu item, you are presented with a dialog
box which lets you select page ranges, number of copies,
etc. In DOS, you would select those options by adding
switches to the PRINT command.
wildcarding
Wildcarding is a way of selecting group of files on the
basis of parts of their names. In most cases, you can
operate on wildcarded filenames as you would operate on
single files, leaving to DOS the task of repeating the same
action on each individual file. The Macintosh Finder lets
you "Find..." files with names containing a particular
string, but then you still have to access the files with
the mouse.